﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace Ingenious.Core.TestHarness
{
    public class LiteralToolTipConverter : IMultiValueConverter
    {
        #region Constants
        private const string LiteralValueDescriptorFormat = "CLR type: {0}\r\nLanguage: {1}";
        #endregion

        #region IMultiValueConverter Implementation
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string literalToolTip = string.Empty;

            Type literalType = values[0] as Type;
            string languageTag = values[1] as string;

            return string.Format(LiteralValueDescriptorFormat, targetType.ToString(), languageTag != null ? languageTag : "<Not Specified>");
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
        #endregion
    }
}
